mqserver() {
    cargo run --example mqserver
}
mqclient() {
    cargo run --example mqclient
}

#db first to entity
generate() {
    sea-orm-cli generate entity -o ./away_db/src/entity
}
test() {
    # 运行单元测试打印println
    cargo test -- --nocapture
}

build() {
    export OPENSSL_DIR=/D/software/vcpkg/packages/openssl_x64-windows
    export OPENSSL_LIB_DIR="${OPENSSL_DIR}/lib"
    export OPENSSL_INCLUDE_DIR="${OPENSSL_DIR}/include"
    export OPENSSL_STATIC=0

    cargo zigbuild -r --target x86_64-unknown-linux-musl
}

$@
